package com.hqsolution.hqserver.client.activity;

import java.util.List;

import android.graphics.drawable.Drawable;
import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

public class GoogleMapActivity extends MapActivity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.gmap);

		MapView mapView = (MapView) findViewById(R.id.mapview);
		mapView.setBuiltInZoomControls(true);

		List<Overlay> mapOverlays = mapView.getOverlays();
		Drawable drawable = this.getResources().getDrawable(R.drawable.icon);
		MapItemizedOverlay itemizedoverlay = new MapItemizedOverlay(
				drawable, this);
		GeoPoint point = new GeoPoint(30443769, -91158458);
		OverlayItem overlayitem = new OverlayItem(point,
				"Laissez les bon temps rouler!", "I'm in Louisiana!");

		GeoPoint point2 = new GeoPoint(17385812, 78480667);
		OverlayItem overlayitem2 = new OverlayItem(point2, "Namashkaar!",
				"I'm in Hyderabad, India!");

		itemizedoverlay.addOverlay(overlayitem);
		itemizedoverlay.addOverlay(overlayitem2);

		mapOverlays.add(itemizedoverlay);
	}

	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}
}